package com.tengju.bff.interfaces.covercharge.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tengju.bff.interfaces.covercharge.entity.po.ServiceSelfCertificationWithdraw;
import com.tengju.bff.interfaces.covercharge.entity.vo.AdminSelfCertificationQueryVo;
import com.tengju.bff.interfaces.covercharge.entity.vo.WithdrawRecordVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 自认证用户提现表 Mapper 接口
 * </p>
 *
 * @author zhaoyi
 * @since 2020-02-26
 */
@Component
public interface ServiceSelfCertificationWithdrawMapper extends BaseMapper<ServiceSelfCertificationWithdraw> {

    List<WithdrawRecordVo> getWithdrawList(@Param("idCode") Integer idCode,@Param("platformCode") String platformCode,@Param("type") Integer type,@Param("dateTime") String dateTime);

    BigDecimal getIssuedAmount(@Param("idCode") Integer idCode,@Param("platformCode") String platformCode,@Param("type") Integer type,@Param("dateTime") String dateTime);

    BigDecimal getBeIssuedAmount(@Param("idCode") Integer idCode,@Param("platformCode") String platformCode,@Param("type") Integer type,@Param("dateTime") String dateTime);

    List<AdminSelfCertificationQueryVo> queryPageCertification(Page pagination, @Param("idCode") String idCode, @Param("name") String name, @Param("invoice") Integer invoice, @Param("platformCode") String platformCode,
                                                               @Param("status") Integer status, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("type") Integer type, @Param("exportType") String exportType);

    List<AdminSelfCertificationQueryVo> queryPageCertificationPaid(Page pagination, @Param("idCode") String idCode, @Param("name") String name, @Param("invoice") Integer invoice, @Param("platformCode") String platformCode,
                                                                   @Param("status") Integer status, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("type") Integer type, @Param("id") String id, @Param("isPrint") Integer isPrint);

    BigDecimal queryCertificationPaidMoneyTotal(@Param("idCode") String idCode, @Param("name") String name, @Param("invoice") Integer invoice, @Param("platformCode") String platformCode,
                                                                   @Param("status") Integer status, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("type") Integer type, @Param("id") String id, @Param("isPrint") Integer isPrint);

    List<AdminSelfCertificationQueryVo> withdrawListByTime(@Param("idCode") Integer idCode, @Param("platformCode") String platformCode, @Param("type") Integer type, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<ServiceSelfCertificationWithdraw> queryPageCertificationPaidWithList(@Param("cycleAddIdList") List<Integer> cycleAddIdList);


    List<ServiceSelfCertificationWithdraw> queryPageCertificationWithdraw(@Param("from") Integer from, @Param("to") Integer to);

    int updateBankInfoById(ServiceSelfCertificationWithdraw serviceSelfCertificationWithdraw);
}
